class Solution(object):
    def convertTime(self, current, correct):
        def convert(s):
            t1, t2 = s.split(':')
            return int(t1) * 60 + int(t2)
        c1 = convert(current)
        c2 = convert(correct)
        diff = c2 - c1
        ans = 0
        if diff >= 60:
            ans += diff // 60
            diff %= 60
        if diff >= 15:
            ans += diff // 15
            diff %= 15
        if diff >= 5:
            ans += diff // 5
            diff %= 5
        ans += diff
        return ans